// __PUBLIC__/js/page/admin/global/register
require(['../../common'], function() {
  require(['global.register'])
})

define('global.register', [
  'jquery'
], function($) {
  'use strict';


  //只能输入数字

  function KeyCodeOnlyNumber() {
    if (window.event.keyCode == 37 || window.event.keyCode == 38 || window.event.keyCode == 39 || window.event.keyCode == 40) {
      return;
    }
    if (!((window.event.keyCode >= 48 && window.event.keyCode <= 57) || (window.event.keyCode >= 96 && window.event.keyCode <= 105) || window.event.keyCode == 13 || window.event.keyCode == 8 || window.event.keyCode == 46 || window.event.keyCode == 9)) {
      window.event.returnValue = false;
    }
  }

  function clickCheckbox(objChk, objTxt) {
    if (objChk.checked)
      document.getElementById(objTxt).value = 'Y';
    else
      document.getElementById(objTxt).value = 'N';
  }

  function showTiaokuan(flg) {
    if (flg == '1')
      document.getElementById('tbShow').style.display = '';
    else
      document.getElementById('tbShow').style.display = 'none';
  }
  //只能输入数字和逗号

  function KeyCodeOnlyNumberCom() {
    if (window.event.keyCode == 37 || window.event.keyCode == 38 || window.event.keyCode == 39 || window.event.keyCode == 40) {
      return;
    }
    if (!((window.event.keyCode >= 48 && window.event.keyCode <= 57) || (window.event.keyCode >= 96 && window.event.keyCode <= 105) || window.event.keyCode == 13 || window.event.keyCode == 8 || window.event.keyCode == 46 || window.event.keyCode == 9 || window.event.keyCode == 188)) {
      window.event.returnValue = false;
    }
  }
  //依照資料覺得是否先是條款
  showTiaokuan('{$tiaokuan}');

})
